From 0bc78bd3879747bfe7ec3ed282a0276f16744c82 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 24 Mar 2026 12:03:08 +0200 Subject: [PATCH] [PATCH 2/2] dsync: Fix escaping mail or attribute value that begins with a "." line Such a mail or attribute would have escaped the value parameter and the rest of the value would have been processed as dsync stream commands. Gbp-Pq: Name 0002-dsync-Fix-escaping-mail-or-attribute-value-that-begi.patch --- src/doveadm/dsync/dsync-ibc-stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doveadm/dsync/dsync-ibc-stream.c b/src/doveadm/dsync/dsync-ibc-stream.c index 0b30382..390c9a5 100644 --- a/src/doveadm/dsync/dsync-ibc-stream.c +++ b/src/doveadm/dsync/dsync-ibc-stream.c @@ -1533,7 +1533,7 @@ dsync_ibc_stream_send_mailbox_attribute(struct dsync_ibc *_ibc, dsync_ibc_stream_send_string(ibc, str); if (attr->value_stream != NULL) { - ibc->value_output_last = '\0'; + ibc->value_output_last = '\n'; ibc->value_output = attr->value_stream; i_stream_ref(ibc->value_output); (void)dsync_ibc_stream_send_value_stream(ibc); @@ -1913,7 +1913,7 @@ dsync_ibc_stream_send_mail(struct dsync_ibc *_ibc, dsync_ibc_stream_send_string(ibc, str); if (mail->input != NULL) { - ibc->value_output_last = '\0'; + ibc->value_output_last = '\n'; ibc->value_output = mail->input; i_stream_ref(ibc->value_output); (void)dsync_ibc_stream_send_value_stream(ibc); -- 2.39.5